package top.pengdong.pictureShare.tweet.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import top.pengdong.pictureShare.tweet.entity.PsTweetEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import top.pengdong.pictureShare.tweet.entity.TUsersEntity;

import java.net.Inet4Address;

/**
 * 文章表
 * 
 * @author chenshun
 * @email pengshi12138@outlook.com
 * @date 2022-04-25 16:55:46
 */
@Mapper
public interface PsTweetDao extends BaseMapper<PsTweetEntity> {
	int updateNumById(PsTweetEntity psTweet);
	@Cacheable(value={"USER_INFO"},keyGenerator = "firstParamKeyGenerator") // 指定key值为方法名字
	TUsersEntity getUserInfo(Long userId);

	/**
	 * 获取用户关系
	 * @param userId
	 * @param aid
	 * @return
	 */
	Integer getUserRelation(@Param("userId") Long userId,@Param("aid") Long aid);
}
